define(['app','cart'],function(app,cart){
	app.controller("zhucectl",['$scope','$http','$location',function($scope,$http,$location){
			$scope.zhuce= function(){
			var ajax1=new XMLHttpRequest();
			ajax1.open('post','http://127.0.0.1/kadxm/index2.php');
			ajax1.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
			var inputs1=document.getElementsByTagName('input');
			ajax1.send("username="+inputs1[0].value+"&password="+inputs1[1].value);
			ajax1.onreadystatechange=function(){
				if(ajax1.status==200&&ajax1.readyState==4){
					var obj1=JSON.parse(ajax1.responseText);
					if(obj1.code==0){
						$location.path('/denglu');
					}else{
						alert(obj1.msg);
					}
				};
			}
		}
	}])
})